﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Article.aspx.cs" Inherits="famails.BackEnd.Blog.Article" MasterPageFile="~/Master.Master" %>


<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%-- <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>--%>
    <style type="text/css">
        #ContentPlaceHolder1_cbShow {
            height: 20px;
            width: 20px;
            margin-top: -3px;
            margin-left: 10px;
        }
    </style>
    <script language="javascript" type="text/javascript">
        $(function () {
            setInterval(KeepSessionAlive, 10000);
        });

        function KeepSessionAlive() {
            $.post("/backend/page/KeepSessionAlive.ashx", null, function () {
                //$("#result").append("<p>Session is alive and kicking!<p/>");
                setInterval(function () { beatHeart(5); }, 10000);
            });
        }
        function beatHeart(times) {
            var interval = setInterval(function () {
                $(".heartbeat").fadeIn(500, function () {
                    $(".heartbeat").fadeOut(500);
                });
            }, 1000); // beat every second

            // after n times, let's clear the interval (adding 100ms of safe gap)
            setTimeout(function () { clearInterval(interval); }, (2000 * times) + 500);
        }
    </script>
    <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border: 1px solid #333; padding: 0px; margin-bottom: 10px;">
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px 20px; background: #000; color: #fff; font-size: 18px; font-weight: bold; position: relative;">
            Quản lý chức năng
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
            <asp:Panel Visible="false" ID="pnError" runat="server">
                <div class="error-box round">
                    <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
                </div>
            </asp:Panel>
            <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                <div class="confirmation-box round">
                    <asp:Label ID="lblSuccess" runat="server" Text=""></asp:Label>
                </div>
            </asp:Panel>
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
            <fieldset>
                <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                <label for="simple-input" style="font-weight: bolder; text-transform: none">
                    Tiêu đề</label>
                <asp:TextBox ID="txtTitle" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
            </fieldset>
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
            <fieldset>
                <label for="simple-input" style="font-weight: bolder; text-transform: none">
                    Tóm tắt</label>
                <asp:TextBox ID="txtSummary" TextMode="MultiLine" Rows="3" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
            </fieldset>
        </div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>

                <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto; padding: 10px;">
                    <fieldset>
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Nhóm chuyên mục</label>
                        <asp:DropDownList ID="ddlCategory" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>

                    </fieldset>
                </div>
                <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto; padding: 10px;">
                    <fieldset>
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Chuyên mục</label>
                        <asp:DropDownList ID="ddlGroup" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:DropDownList>
                    </fieldset>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>

        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 0px;">
            <fieldset>
                <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="height: auto; padding: 25px 0px 0px 10px;">
                    <label for="simple-input" style="font-weight: bolder; float: left; text-transform: none">
                        Hiển thị</label>
                    <asp:CheckBox runat="server" Style="float: left;" ID="cbShow"></asp:CheckBox>
                </div>
                <div class="col-md-9 col-xs-6 col-sm-6 col-lg-9" style="height: auto; padding: 10px;">
                    <asp:FileUpload runat="server" ID="fuImage" Style="border: 1px solid #333; border-radius: 0px;" CssClass="form-control" accept="image/x-png, image/gif, image/jpeg"></asp:FileUpload><br />
                </div>
            </fieldset>
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
            <fieldset>
                <asp:HiddenField runat="server" ID="hdfImage" />
                <asp:Image runat="server" ID="image" Style="width: 200px;" />
            </fieldset>
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
            <fieldset>
                <label for="simple-input" style="font-weight: bolder; text-transform: none">
                    Nội dung</label>
                <CKEditor:CKEditorControl ID="txtBody" runat="server" CausesValidation="True" ResizeEnabled="False"></CKEditor:CKEditorControl>
            </fieldset>
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
            <fieldset>
                <button id="Button1" runat="server" class="btn" style="background: #333; color: #fff; text-align: center; padding: 6px 15px; border-radius: 0px;" onserverclick="btnSaveContent_Click">
                    <i class="fa fa-save" style="margin-right:10px;"></i>Lưu
                </button>
            </fieldset>
        </div>

    </div>
</asp:Content>

